package com.ding.mongodb.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Field;

@Data
@NoArgsConstructor
public class Authority {
	
	@Field("auth")
	String authority;

	@Transient//忽略
	private User user;

	public Authority(User user, String authority) {
		this.authority=authority;
		this.user=user;
	}

	@Override
	public String toString() {
		return authority;
	}
	
}
